<?php
include_once 'HeaderController.php';

class ProdutosController extends Nadeb_Controller_Front
{
	
    public function init()
    {
    	parent::init();
    }

    public function indexAction()
    {
    	$products = new Site_Model_Products();
    	$this->view->products = $products->getProducts($this->_getParam('limit'), $this->_getAllParams() );
    	$this->view->sidebar = 'searchBar';
    }
    
    public function detalhesAction()
    {
    	$header      = HeaderController::get_instance();
    	$header->css = "public/site/css/jquery.jqzoom.css";
    	$header->js  = "public/site/js/jquery.jqzoom-core.js";
    	
    	$products = new Site_Model_Products();
    	
    	$this->view->promotions = $products->getPromotions(5);
    	$this->view->prd = $products->getProduct( $this->_getParam('id') );
    }
    
}

